inverse of diagonal matrices